home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frm10_1_4
- Caption = "Square Root"
- ClientHeight = 2775
- ClientLeft = 2685
- ClientTop = 1965
- ClientWidth = 2745
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 2775
- ScaleWidth = 2745
- Begin VB.PictureBox picOutput
- Height = 1935
- Left = 120
- ScaleHeight = 1875
- ScaleWidth = 2475
- TabIndex = 1
- Top = 720
- Width = 2535
- End
- Begin VB.CommandButton cmdDraw
- Caption = "Draw Graph"
- Height = 495
- Left = 600
- TabIndex = 0
- Top = 120
- Width = 1575
- End
- Attribute VB_Name = "frm10_1_4"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdDraw_Click()
- Dim x As Single
- 'Graph the Square Root Function
- picOutput.Cls
- picOutput.Scale (-20, 12)-(120, -2) 'Specify coordinate system
- picOutput.Line (-5, 0)-(100, 0) 'Draw x-axis
- picOutput.Line (0, -1)-(0, 10) 'Draw y-axis
- For x = 0 To 100 Step 0.2 'Plot about 500 points
- picOutput.PSet (x, Sqr(x)) 'Plot point on graph
- Next x
- End Sub
-